package com.jiao.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;

public class TBao implements Serializable {
    /**
     * id
     */
    private Integer id;

    /**
     * 参保人名称
     */
    @NotEmpty(message = "参保人名称不能为空！")
    private String name;

    /**
     * 创建日期(也即参保日期)
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createdate;

    /**
     * 月份
     */
    private Integer month;

    /**
     * 所属单位名称
     */
    private String company;

    /**
     * 所属城市
     */
    private String city;

    /**
     * 在职状态;1:在职;2:退休
     */
    private Integer status;

    /**
     * 状态 1有效 0 无效或已删除
     */
    @Null
    private Integer state;

    /**
     * 年
     */
    private Integer year;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Date getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Date createdate) {
        this.createdate = createdate;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company == null ? null : company.trim();
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city == null ? null : city.trim();
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", createdate=").append(createdate);
        sb.append(", month=").append(month);
        sb.append(", company=").append(company);
        sb.append(", city=").append(city);
        sb.append(", status=").append(status);
        sb.append(", state=").append(state);
        sb.append(", year=").append(year);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}